// jquery script ditulis seutuhnya oleh Adi Nugraha
// pencurian Script itu adalah seorang yang Pecundang
// (c) 2009 - 2013 Adi Nugraha.

(function($) {
	var	a = $(window),
		b = $('#wrapper'),
		c = $('document'),
		d = $('#adi-top'),
		e = $('#adi-notification'),
		f = $('#hidewidget'),
		g = $('#showwidget'),
		h = $('.right'),
		i = h.find('.left'),
		j = $('.footer-kolom1'),
		k = $('#comments'),
		l = $('#searchtoggle'),
		m = $('#searchbox'),
		n = $('#adv'),
		o = $('a[href^="#"]'),
		p = $('html, body'),
		q = $('easeInOutExpo');

	});


c.ready(function() {
    o.click(function(event) {
	var id = $(this).attr("href");
	var offset = 23;
	var target = $(id).offset().top - offset;
        p.stop().animate({scrollTop:target}, 1500, 'easeInOutExpo');
        event.preventDefault();
    });
});

a.on('beforeunload', function() {
	b.fadeOut(800).delay(6000).fadeIn(1000);
});

a.scroll(function() {
    if($(this).scrollTop() > 200) {
       d.stop().animate({right: 0}, 700);
       e.animate({top: 0}, 700, 'easeOutBounce').stop();
   } else {
       d.stop().animate({right:-50}, 500);
       e.stop().animate({top:-50}, 500, 'easeInOutExpo');
   }
});

f.click(function () {
	f.stop().fadeOut(100);
	g.delay(3000).fadeIn('slow');
	h.stop().animate({height: 'toggle'}, 500, 'easeInOutExpo');
	i.delay(700).animate({width: '875px'}, 1500, 'easeInOutExpo');
	j.delay(700).animate({width: '545px'}, 1500, 'easeInOutExpo');
	k.delay(700).animate({width: '832px'}, 1500, 'easeInOutExpo');
	b.delay(700).css({fontSize: '13px'}, 1500);
});

g.click(function () {
	g.stop().fadeOut(100);
	f.delay(3000).fadeIn('slow');
	i.animate({width: '630px'}, 1700, 'easeInOutExpo');
	h.delay(1500).animate({height: 'toggle'}, 700, 'easeInOutExpo');
	j.animate({width: '300px'}, 1500, 'easeInOutExpo');
	k.animate({width: '600px'}, 1500, 'easeInOutExpo');
	b.css({fontSize: '11px'}, 1500);
});

l.click(function () {
	// n.stop().toggle('slow');
	m.stop().animate({height: 'toggle'}, 700);
});